//
//  BCREWrapper.h
//  bcDiscriminator
//
//  Created by Volker Runkel on 03.11.06.
//  Copyright 2006 Volker Runkel, ecoObs.
//	Mail me at runkel @ eco obs . de
//
/*
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; either version 2
 of the License, or (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 */

// The following code is adopted from R.gui (Mac) which was written mainly by Simon Urbanek

#import <Cocoa/Cocoa.h>
#include <R.h>
#include <Rversion.h>
#include <Rinternals.h>
#include <R_ext/Parse.h>
#include <R_ext/eventloop.h>

#include <Fileio.h>
#if (R_VERSION >= R_Version(2,1,0))
// Rinterface is public, but present only in 2.1+
#include <Rinterface.h>
#else
// if there is no Rinterface, we need private Defn.h
#include "privateR.h"
#endif

#include <langinfo.h>
#include <locale.h>

/*#import <sys/fcntl.h>
#import <sys/select.h>
#import <sys/types.h>
#import <sys/time.h>
#import <sys/wait.h>
#import <signal.h>
#import <unistd.h>*/

#import "REngine/Rcallbacks.h"
#import "REngine/REngine.h"
#import "RSEXP.h"


@interface BCREWrapper : NSObject < REPLHandler > {
	
	NSString *currentDataFile;
}

+ (BCREWrapper*) Rwrapper;

- (void)setFileName:(NSString*)file;
- (NSArray*)outlierDetector:(NSArray*)dataRows;
- (BOOL)predictFile:(NSArray*)dataRows;

@end
